﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:EString.EditorExtensions"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Extenders="using:EString.EditorExtensions.Extenders" x:Name="userControl"
    x:Class="EString.EditorExtensions.EditorExtenderWrapper"
    mc:Ignorable="d"
    d:DesignHeight="296"
    d:DesignWidth="560">
	<UserControl.Projection>
		<PlaneProjection/>
	</UserControl.Projection>

    <Grid>
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="VisualStateGroup">
    			<VisualStateGroup.Transitions>
    				<VisualTransition GeneratedDuration="0:0:0.5">
    					<VisualTransition.GeneratedEasingFunction>
    						<BackEase EasingMode="EaseInOut" Amplitude="0.5"/>
    					</VisualTransition.GeneratedEasingFunction>
    				</VisualTransition>
    			</VisualStateGroup.Transitions>
    			<VisualState x:Name="Show"/>
    			<VisualState x:Name="Hide">
    				<Storyboard>
    					<DoubleAnimation Duration="0" To="-1" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationY)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="-90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="userControl" d:IsOptimized="True"/>
    					<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsHitTestVisible)" Storyboard.TargetName="userControl">
    						<DiscreteObjectKeyFrame KeyTime="0">
    							<DiscreteObjectKeyFrame.Value>
    								<x:Boolean>False</x:Boolean>
    							</DiscreteObjectKeyFrame.Value>
    						</DiscreteObjectKeyFrame>
    					</ObjectAnimationUsingKeyFrames>
    				</Storyboard>
    			</VisualState>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        
<ContentControl x:Name="MainContent" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"/>
        <StackPanel Grid.Column="1" Orientation="Vertical" VerticalAlignment="Top" Margin="0,0,16,0">
            <Button x:ConnectionId='1' x:Name="btnClose" VerticalAlignment="Top" Content="X" ToolTipService.ToolTip="Close the current editor extension" HorizontalAlignment="Stretch"                       />
            <Button x:Name="btnHelp" VerticalAlignment="Top" Content="?" ToolTipService.ToolTip="Close the current editor extension" HorizontalAlignment="Stretch"/>
        </StackPanel>
        <VariableSizedWrapGrid x:Name="PinContent"/>
    </Grid>
</UserControl>

